
export default class TSTree<T>{


    private parent: TSTree<T>;

    private children: TSTree<T>[] = []

    private data: T;

    setData(d: T) {
        this.data = d;
    }

    getData() {
        return this.data;
    }

    putChild(index: number, child: TSTree<T>) {
        this.children[index] = child;
    }

    addChild(node: TSTree<T>) {
        this.children.push(node)
    }

    getChildren() {
        return this.children;
    }



}